package com.improve.frame.common.exception;

import lombok.Getter;

/**
 * @Description
 *      业务异常
 * @Author wzxing918
 * @Date 2021-03-31
 * @Version 1.0.0
 **/
@Getter
public class BusinessException extends RuntimeException {
    /**
     * 错误码
     */
    private final int errorCode;

    public BusinessException() {
        this("业务异常");
    }

    public BusinessException(String errMsg) {
        this(errMsg, 0);
    }

    public BusinessException(String errMsg, Integer errorCode) {
        super(errMsg, null, false, false);
        this.errorCode = errorCode;
    }
}
